Skip to content

fasttext-wheel: add build-fasttext-wheel.yml for riscv64 wheels - #1621

Merged
luhenry merged 1 commit into
mainfrom
fasttext-wheel
Sep 8, 2026
Merged

fasttext-wheel: add build-fasttext-wheel.yml for riscv64 wheels#1621
luhenry merged 1 commit into
mainfrom
fasttext-wheel

Conversation

@luhenry

@luhenry luhenry commented Sep 8, 2026

Copy link
Copy Markdown
Member

Compiles fastText's pybind11 C++ extension (word representations and text classification) from the facebookresearch/fastText source that messense's fasttext-wheel PyPI distribution renames and republishes. Upstream publishes no riscv64 wheel.

Mirrors messense/fasttext-wheel's Linux.yml, rebuilt as a cibuildwheel build-from-checkout against the unmodified facebookresearch/fastText tag instead of the shell-script manylinux loop it uses.

Differs from upstream

  • Uses cibuildwheel instead of a hand-rolled docker run + auditwheel loop - matches this repo's standard shape, same compiled output.

Testing

  • Runs upstream's runtests.py -u unit suite (gen_unit_tests) directly against the installed fasttext.tests subpackage, since runtests.py itself lives outside the wheel.

License: OK

Patches

  • 0001-setup-rename-distribution-to-fasttext-wheel.patch - Inappropriate, downstream naming. Renames the PyPI distribution the way messense's own build script does; without it the wheel would be named fasttext, not fasttext-wheel.
  • 0002-FastText-fix-numpy-2.x-copy-False-compatibility.patch - To upstream, blocked (facebookresearch/fastText archived 2024-03-19). np.array(x, copy=False) raises under numpy>=2.0, breaking predict()/scores(); reproduces off riscv64.

Built on cp312; 83 passed, 0 skipped.

luhenry added a commit that referenced this pull request Sep 8, 2026
@luhenry
luhenry force-pushed the fasttext-wheel branch 2 times, most recently from 6fd64be to d00c113 Compare September 8, 2026 15:06
Builds fastText's pybind11 extension from facebookresearch/fastText v0.9.2,
renamed to the fasttext-wheel PyPI distribution messense publishes it under,
with patches fixing a numpy 2.x regression in predict()/scores() and a
riscv64-only missing <cstdint> include (backported from an upstream commit
that fixed the same failure under GCC 13, before the repo was archived).

setup.py has no pyproject.toml declaring pybind11 as a build dependency;
its get_pybind_include self-installs pybind11 via `pip install` when missing,
but the isolated build venv `python -m build` creates has no pip module,
so that self-install fails. Pre-install pybind11/setuptools/numpy (its
install_requires) and build without isolation instead.
luhenry added a commit that referenced this pull request Sep 8, 2026
@luhenry
luhenry merged commit 2fbe6f8 into main Sep 8, 2026
9 checks passed
@luhenry
luhenry deleted the fasttext-wheel branch September 8, 2026 16:23
@luhenry luhenry linked an issue Sep 8, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fasttext-wheel riscv64 support

1 participant